package class1;


import interface1.Skinnable;
import src.class1.Pet;

public class RobotPet extends Pet implements Skinnable {
    private int skin=BLACK;
    public RobotPet(String name,String masterName){
        super(name,masterName);
    }
    @Deprecated
     public void introduce(){
        System.out.println("我是机器人。名字是"+getName()+"。");
        System.out.println("我的主人是"+getMasterName()+"。");
    }
    public void work(int sw){
        switch (sw){
            case 0:
                System.out.println("做饭");break;
            case 1:
                System.out.println("洗衣服");break;
            case 2:
                System.out.println("拖地");break;
        }
    }


    @Override
    public void changeSkin(int skin) {

        System.out.print("皮肤换成了");
        switch (skin){
            case BLUE: System.out.println("蓝色");break;
            case BLACK: System.out.println("黑色");break;
            case GREEN: System.out.println("绿色");break;
            case RED: System.out.println("红色");break;
            default:
                System.out.println("白色");break;
        }
//        if (skin==BLACK)
//            System.out.println("换成黑色成功！");
//        if (skin==RED)
//            System.out.println("换成红色成功！");
    }
}
